Repository navigation
fix(v2): stop sending or checking product codes; take extra names only from Command's SAN list - #50
Merged
Conversation
…a Wildcard UCC product A DV/OV request with CN = apex and SAN = *.apex and no template ProductCode was rejected before ordering whenever the catalog didn't list exactly one active product with productTypeID 21/22. Catalogs on other CA backends (SSL.com) need not use those IDs, and there CERTInext accepts this shape with no X-Product-Code. Now: - One active Wildcard UCC product: its code is sent, as before. - None, several, or an unreadable catalog: a warning is logged and the order is placed with no X-Product-Code. An EMS-1173 from CERTInext then says to set ProductCode on the template. EV still fails before ordering. - Explicit ProductCode whose catalog entry has no documented SSL productTypeID (not listed, none, unfamiliar, or no catalog): UCC is decided from the request's SANs instead of rejecting extra SANs, and template save-time validation accepts the code instead of reporting a product mismatch. - Flat catalog rows keyed by productCode are available when they carry no "active" field, and a numeric productTypeID no longer fails the read. Also clears a CS8602 on the SSL.com organization check (the variant is "ov" or "ev" there).
… switches, V1 enroll logging - V2WildcardSanShapeTests.Probe_Raw_ApexCn_WildcardSan posts the create body directly (no X-Product-Code, CSR inline, CN = apex, SAN = *.apex), with and without additionalDomains. - PrivatePkiV2LiveTests routes plugin logs to the test output and takes CERTINEXT_PRIVATE_PKI_VARIANT and CERTINEXT_PRIVATE_PKI_LEAVE_PENDING. - DcvLifecycleTests.EnrollWithoutDcv_DoesNotInvokeDnsProvider routes plugin logs and prints the enroll result.
…e ProductCode as given CERTInext advises sending only the variant and leaving X-Product-Code out. Removes the catalog lookup that pinned a Wildcard UCC product (typeID 21/22) for a wildcard SAN on a plain CN, along with its no-match fallback and EMS-1173 hint. That request now goes out like any other: CN as the domain, the wildcard in additionalDomains, no header unless the template sets ProductCode, no catalog call. EV with a wildcard SAN is still rejected before ordering. Drops the now-unused WildcardUccProductTypeIdByVariant.
…de it can't use V2 no longer checks a template ProductCode against the catalog: - Enrollment never reads the catalog. Wildcard/UCC is decided from the request for every SSL order (domain "*.", UCC template product, or extra DNS SANs going out in additionalDomains), with or without ProductCode. The single-domain SAN guard, which could only reject an explicit code the catalog listed as non-UCC, is gone. An explicit code is sent as given. - Template save (ValidateProductInfo) no longer looks the code up in the V2 catalog, for SSL or Private PKI. The ProductVariant, Private PKI variant and OV organization representative checks stay. - EV with a wildcard SAN is still rejected before ordering. V1 is unchanged: its template save still checks the code with GetProfilesAsync. Drops the now-unused WildcardProductTypeIds and PrivatePkiProductTypeId constants.
…dress review findings SAN source: FindExtraDnsSans took the union of the CSR's SANs and the gateway's SAN dictionary, while additionalDomains came from the dictionary. A DNS name only in the CSR made the order multi-domain yet was left out of additionalDomains. Both now use CollectRequestedSanEntries: the dictionary, or the CSR only when the dictionary is null. That matches the other Keyfactor CA plugins that build a SAN list for their CA (DigiCert, Entrust, Vault, GCP CAS, GoDaddy, Sectigo, GlobalSign, HydrantID, SSLStore, CSC): dictionary only, CSR passed through, no union and no rejection. BuildSanList, which V1 also uses, is unchanged. Review findings: - Drop the EV wildcard pre-check (it covered only a wildcard SAN, not a wildcard domain); CERTInext decides. - Flat catalog rows: "active" is honored only as JSON true/false; a missing or null value is available, anything else isn't. The CHANGELOG no longer claims an Active fix (nothing reads it). - The UCC log line no longer says the plugin "resolved" a product. - Docs note that some accounts reject a wildcard-only-in-SANs request with EMS-1173, and that ProductCode is the way around it. - Catalog_ListsProductTypeIds comment: informational only.
…ade note and known limitations Merges the two overlapping X-Product-Code/ProductCode feature entries into one that describes the final behavior, tightens the related fixes, adds an upgrade note for earlier 2.0 builds (no save-time ProductCode check; CSR-only SAN names ignored), and lists EMS-1173 on wildcard-only-in-SANs requests and the missing live verification as known limitations.
… 2.0.0 Removes sandbox and live-test references, test dates, rationale asides and the notes aimed at pre-release builds from the 2.0.0 entries, and the same sandbox aside from the configuration doc.
spbsoluble
added a commit
that referenced
this pull request
Nov 17, 2026
#51) PR #50 removed V2's save-time ProductCode catalog check and the single-domain SAN guard, but two live tests still described or asserted them: - V2ApiTests.ValidateProductInfo_V2_RejectsUnknownProductCode expected an unknown code to be rejected at template save. Renamed to ValidateProductInfo_V2_AcceptsUnknownProductCode_WithoutCatalogCheck and now asserts it's accepted; ValidateProductInfo_V2_AcceptsConfiguredProductCode's reason no longer says the code must be in the catalog. - V2FullLifecycleTests.Enroll_V2_WildcardDv_WildcardPlusApexSan_RecordsActualBehavior no longer attributes a FAILED result to the removed guard; it logs the result and cleans up any order created.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CERTInext has told us not to send the
X-Product-Codeheader on V2 order create. Clients should send only the variant (productVariant, e.g.dv) and let CERTInext pick the product. This PR makes the V2 plugin follow that guidance, stop checking product codes itself, and take an order's extra names only from Command's SAN list:ProductCodeon the template: the header is never sent.ProductCodeset on the template: it's sent as given. The plugin doesn't check it against the catalog, neither when the template is saved nor at enrollment. If the code is wrong, CERTInext rejects the order and the error comes back to the user.additionalDomains. A DNS name that is only in the CSR is ignored, and the CSR itself is still sent unchanged. That's what the other Keyfactor CA plugins that build a SAN list for their CA do (DigiCert, Entrust, Sectigo, GlobalSign, ...).The plugin used to look products up in the CERTInext catalog by
productTypeIDand reject requests based on what it found. That caused problems on accounts whose catalogs don't use those IDs, such as SSL.com-backed accounts. One example: a request with CNexample.comand SANsexample.comand*.example.comwas rejected without ever reaching CERTInext.ProductCode, wildcard only in the SANsadditionalDomainsProductCodeset, extra SANs, catalog lists the code as single-domainadditionalDomains; CERTInext decidesProductCode(SSL or Private PKI)productTypeIDadditionalDomainsFixes
EnrollV2CoreAsync):*., a UCC template product, or extra DNS names in Command's SAN list, which go inadditionalDomains.FindExtraDnsSans): now uses the same source asadditionalDomains(CollectRequestedSanEntries): Command's SAN list, or the CSR only when the gateway passes no list. It used to take the union of the CSR and the SAN list.BuildSanList, which V1 also uses, is unchanged.ValidateProductInfo):ProductCodeup in the catalog, for SSL or Private PKI.ProductVariant, Private PKI variant and OV organization representative checks stay.GetProfilesAsynccheck is unchanged.ParseProductDetailsV2Response, used by sync): a numericproductTypeIDin a flat row no longer fails the catalog read. On those rows,activeis honored only as JSONtrue/false; a missing or null value counts as available.Chores
WildcardUccProductTypeIdByVariant,WildcardProductTypeIdsandPrivatePkiProductTypeId.docsource/configuration.md: V2 product code resolution and SAN source, plus a note that some accounts reject a wildcard-only-in-SANs request withEMS-1173, and that settingProductCodeworks around it. Private PKI orders too.docsource/architecture.md: V2 enroll flowchart, product-code notes and template validation.docsource/migration-v1-to-v2.md.CHANGELOG.md(2.0.0):ProductCode/X-Product-Codefeature entries are merged into one that describes the final behavior.EMS-1173on wildcard-only-in-SANs requests on some accounts.V2WildcardSanShapeTests.Probe_Raw_ApexCn_WildcardSansends the create request directly, with noX-Product-Code.PrivatePkiV2LiveTeststakes two new switches,CERTINEXT_PRIVATE_PKI_VARIANTandCERTINEXT_PRIVATE_PKI_LEAVE_PENDING, and routes plugin logs to the test output.DcvLifecycleTests.EnrollWithoutDcv_DoesNotInvokeDnsProviderroutes plugin logs and prints the result.Testing
CERTInext.Tests, Release).FindExtraDnsSanstakes names only from Command's SAN list: a CSR-only name is ignored whether the list holds only the primary domain or is empty. The CSR is used only when there is no list, and names that are only in the list are kept.productTypeID, andactivegiven as missing,false,"false",0ornull.Other
Stacked on #39 (
feat/v2-consolidated).